//
//  ChangeInfoViewController.m
//  DefendHealth
//
//  Created by 吾诺翰卓003 on 17/2/21.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "ChangeInfoViewController.h"

@interface ChangeInfoViewController ()

@end

@implementation ChangeInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.TitleNav.text = @"修改个人信息";
    
    UIButton *releaseBtn = [[UIButton alloc] initWithFrame:CGRectMake(WindowWidth-10-[ToolUtil autoWidth:@"完成" width:500 height:13 num:13], 20, [ToolUtil autoWidth:@"完成" width:500 height:13 num:13], 40)];
    [releaseBtn setTitle:@"完成" forState:UIControlStateNormal];
    //    [releaseBtn addTarget:self action:@selector(release:) forControlEvents:UIControlEventTouchUpInside];
    releaseBtn.titleLabel.font = FONT(13);
    releaseBtn.titleLabel.textAlignment = 2;
    [releaseBtn setTitleColor:[ImageUtil colorWithRgb:0x333333] forState:0];
    [self.view addSubview:releaseBtn];
    [self addView];
    UIView *hui = [UIView new];
    hui.frame = CGRectMake(12, 63.5,WindowWidth-24 , 0.5);
    hui.backgroundColor = kLineColor;
    [self.view addSubview:hui];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)addView{
    UIView *view2 = [UIView new];
    view2.frame = CGRectMake(0, 64,WindowWidth , 81);
    view2.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view2];
    
    UIImageView *touxiang = [UIImageView new];
    touxiang.frame = CGRectMake(10, 15.5, 50, 50);
    touxiang.backgroundColor = [UIColor grayColor];
    touxiang.layer.cornerRadius = 25;
    touxiang.layer.masksToBounds = YES;
    [view2 addSubview:touxiang];
    
    UILabel *lab5 = [UILabel new];
    lab5.frame = CGRectMake(kMaxX(touxiang.frame)+14, 0, 200, 81);
    lab5.text = @"头像";
    lab5.font = FONT(14);
    lab5.textColor = UIColorFromRGB(0x333333);
    lab5.textAlignment = 0;
    [view2 addSubview:lab5];
    
    UIImageView *right = [UIImageView new];
    right.frame = CGRectMake(WindowWidth-10-12, 34.5, 9, 12);
    right.image = [UIImage imageNamed:@"point"];
    [view2 addSubview:right];
    
    UILabel *lab2 = [UILabel new];
    lab2.frame = CGRectMake(WindowWidth-12-10-12-200, 0, 200, 81);
    lab2.text = @"修改";
    lab2.font = FONT(14);
    lab2.textColor = UIColorFromRGB(0x333333);
    lab2.textAlignment = 2;
    [view2 addSubview:lab2];

    UIView *hui = [UIView new];
    hui.frame = CGRectMake(12, 80.5,WindowWidth-24 , 0.5);
    hui.backgroundColor = kLineColor;
    [view2 addSubview:hui];
    
    NSArray *titleArr = @[@"名称",@"个性签名",@"我的二维码"];
    NSArray *contentArr = @[@"MDK",@"天下无敌MDK",@""];
    for (int i = 0; i<titleArr.count; i++) {
        UIView *view1 = [UIView new];
        view1.frame = CGRectMake(0, 64+81+47*i,WindowWidth , 47);
        view1.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:view1];
        
        UILabel *lab1 = [UILabel new];
        lab1.frame = CGRectMake(10, 0, 118, 47);
        lab1.text = titleArr[i];
        lab1.font = FONT(14);
        lab1.textColor = UIColorFromRGB(0x333333);
        lab1.textAlignment = 0;
        [ view1 addSubview:lab1];
        
        UIImageView *right = [UIImageView new];
        right.frame = CGRectMake(WindowWidth-10-12, 17.5, 9, 12);
        right.image = [UIImage imageNamed:@"point"];
        [view1 addSubview:right];
        
        UILabel *lab2 = [UILabel new];
        lab2.frame = CGRectMake(WindowWidth-12-10-12-200, 0, 200, 47);
        lab2.text = contentArr[i];
        lab2.font = FONT(14);
        lab2.textColor = UIColorFromRGB(0x333333);
        lab2.textAlignment = 2;
        [view1 addSubview:lab2];
        if (i == 2) {
            UIImageView *img = [UIImageView new];
            img.frame = CGRectMake(WindowWidth-10-12-15-25, 11, 25, 25);
            img.backgroundColor = [UIColor grayColor];
            [view1 addSubview:img];
        }
        
        UIView *hui = [UIView new];
        hui.frame = CGRectMake(12, 46.5,WindowWidth-24 , 0.5);
        hui.backgroundColor = kLineColor;
        [view1 addSubview:hui];
    }
}

@end
